{include file="admin/top.php" subject='moving'}
{include file="moving/top.php" subject='moving'}
<div id="content">
{rights right='moving_settingProductList'}
<ul id="addmenu">
<li style="display: inline;"><a href="{$site_admin}m=inventory&s=moving.php&paper_id={$smarty.get.paperId}">调拨单列表</a></li>
<li style="display: inline;float:right;"><a href="javascript:void(0);" onclick="showAddMoving({$smarty.get.paperId})">添加商品</a></li>
</ul>
{/rights}
    <div id="boxquery">
<!--     <form method="get"> -->
<!--     	<input type="hidden" name="m" value="inventory" /> -->
<!--         <input type="hidden" name="s" value="moving.php" /> -->
        
<!--     </form> -->
    </div>
    
<form action="{$site_admin}m=inventory&s=moving.php&uri=settingProductList&paperId={$smarty.get.paperId}" method="post" onsubmit="return confirm('操作数据后不可恢复, 确定删除?')">
    <table width="100%" border="0" cellspacing="0" cellpadding="5" id="lister">
    <tbody>
      <tr id="title">
      	<td width="40"><input type="checkbox" class="checkall" ></td>
        <td width="40">SKU_ID</td>
        <td>产品图片</td>
        <td>产品名称</td>
        <td>规格</td>
        <td>数量</td>
        <td>单位</td>
        <td>条码数字</td>
      </tr>
      {moving limit=20 pager=pager page=$segment.page order="id desc" product_name=$smarty.get.product_name paper_id=$smarty.get.paperId counter=1}
      <tr id="content">
      	<td><input type="checkbox" value="{$moving.id}" class="checkitem" name="chk[]" /></td>
        <td>{$moving.productid}</td>
        <td height="50">{if $moving.product_pic}<img src="{$moving.product_pic}" width="50" height="50" />{else}暂无图片{/if}</td>
        <td>{$moving.product}</td>
        <td>{$moving.spec}</td>
        <td><input type="text" id="moving_{$moving.id}" onblur="saveMovingProNum({$moving.id});" value="{$moving.number}"/></td>
        <td>{$moving.unit}</td>
        <td>{$moving.barcode}</td>
      </tr>
      {/moving}
      {if $pager->rows==0}
      <tr id="content">
        <td colspan="20">&nbsp;</td>
      </tr>
      {/if}
      </tbody>
      <tfoot>
            <tr>
                <td colspan="15">
	                <input type="hidden" name="action" value="delete" />
                    <input type="submit" value="删除" />
                </td>
            </tr>
    </tfoot>
    </table>
</form>
    <div id="pager" class="mt10">
		{if $pager}共{$pager->rows}条记录 第{$pager->pagecurrent}/{$pager->pages}页 {/if} 		
        {if $pager->current > 1}<a href="{url s1=1}">首页</a>{/if}
        {if $pager->current > 1}<a href="{url s1=$pager->current-1}">上页</a>{/if}
        {if $pager->current < $pager->pages}<a href="{url s1=$pager->current+1}">下页</a>{/if}
        {if $pager->current < $pager->pages}<a href="{url s1=$pager->pages}">尾页</a>{/if}
    </div>
	<p>&nbsp;</p>
</div>
{include file="admin/bottom.php"}
</body>
</html>
